package algorithm.poj.p3000;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLDecoder;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;


/**
 * 分析：
 * 
 * 实现：
 * 
 * 经验：
 * 
 * 教训：
 * 
 * @author wong.tong@gmail.com
 *
 */
public class P3349 {

	public static void main(String[] args) throws Exception {

		InputStream input = null;
		if (false) {
			input = System.in;
		} else {
			URL url = P3349.class.getResource("P3349.txt");
			File file = new File(URLDecoder.decode(url.getPath(), "UTF-8"));
			input = new FileInputStream(file);
		}
		
		BufferedReader stdin = new BufferedReader(new InputStreamReader(input));

		boolean found = false;
		String line = stdin.readLine();
		int n = Integer.valueOf(line);
		Set<String> snowflakes = new HashSet<String>();
		for (int i = 0; i < n; i ++){
            line = stdin.readLine().trim();
            String[] tmp = line.split("\\s+");
            Arrays.sort(tmp);
            String snowflake = Arrays.asList(tmp).toString();
            if (snowflakes.contains(snowflake)) {
            	found = true;
            	break;
            } else {
            	snowflakes.add(snowflake);
            }
		}
		if (found) {
			System.out.println("Twin snowflakes found.");
		} else {
			System.out.println("No two snowflakes are alike.");
		}
	}
}
